import os
import sys
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent  # 根路径
RUNTIME_PATH = os.path.join(BASE_DIR, 'runtime')  # 运行环境目录
LOG_PATH = os.path.join(RUNTIME_PATH, 'log')  # 日志目录
EXTEND_PATH = os.path.join(BASE_DIR, 'extend')  # 依赖文件路径
PROMPT_PATH = os.path.join(EXTEND_PATH, 'prompt')  # Prompt的JSON结构存储根路径
JS_PATH = os.path.join(EXTEND_PATH, 'js')  # JS文件路径
KEY_WORD_PATH = os.path.join(EXTEND_PATH, 'key_word')

ZHUPU_API_KEY = "9e1c9455db2e47e8a1163d1de9f2415a.YrdlA5GSLnSktacG"
ZHIPU_API_URL = "https://open.bigmodel.cn/api/paas/v4/chat/completions"

# payload = {
#     "model": "glm-4-flash",
#     "messages": [
#         # {"role": "system", "content": system_prompt},
#         {"role": "user", "content": "你好"}
#     ]
# }

# headers = {"Content-Type": "application/json"}

# headers["Authorization"] = f"Bearer {ZHUPU_API_KEY}"

# resp = requests.post(ZHIPU_API_URL, json=payload,
#                      headers=headers)
# print(resp.json())
